<template>
  <div class="sign-in">
    <div class="logo">
      <img src="@/assets/images/haha.png" alt />
    </div>
    <div class="desc">
      <h3>签到成功</h3>
      <p>恭喜您成功签到{{info.activity_name}}</p>
    </div>
    <div class="contact">
      <p>{{info.user.nickname}}</p>
      <p>{{info.user.phone}}</p>
    </div>
    <div class="time">
      <p>{{new Date().getFullYear() + '.' + parseInt(new Date().getMonth()) + 1 + '.' + new Date().getDate() + ''}}</p>
      <p>{{new Date().getHours() + ':' + new Date().getMinutes()}}</p>
    </div>
    <div class="miniprogram-code">
      <div class="img-box">
        <img src="https://zhixiu-picture.oss-cn-shanghai.aliyuncs.com/ddsc1592794700.jpg" alt />
      </div>
      <p>长按识别，了解更多哦～</p>
    </div>
    <div class="my-btn">
      <my-botton name="返回首页" class="mybtn" @btnClick="$router.replace('/home')" />
      <my-botton name="更多活动" class="mybtn" @btnClick="$router.replace('/home/activity')" />
    </div>

  </div>
</template>
<script>
import MyBotton from '@/components/button/button'

export default {
  components: {
    MyBotton
  },
  data () {
    return {
      info: null
    }
  },
  created () {
    if (this.$route.query.info) {
      this.info = this.$route.query.info
    }
  },
  methods: {

  }
}
</script>
<style lang="scss" scoped>

.sign-in {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  .logo {
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .desc {
    margin-top: 1.52rem;
    text-align: center;
    h3 {
      font-size: 0.48rem;
      font-family: PingFang SC;
      font-weight: 600;
      color: rgba(0, 4, 0, 1);
      line-height: 0.48rem;
    }
    p {
      font-size: 0.22rem;
      font-family: PingFang SC;
      font-weight: 500;
      color: rgba(0, 4, 0, 1);
      line-height: 0.36rem;
      margin-top: 0.31rem;
    }
  }
  .contact {
    text-align: center;
    margin-top: 1.14rem;
    p {
      &:nth-child(1) {
        font-size: 0.3rem;
        font-family: PingFang SC;
        font-weight: bold;
        color: rgba(0, 4, 0, 1);
        line-height: 0.36rem;
      }
      &:nth-child(2) {
        font-size: 0.22rem;
        font-family: PingFang SC;
        font-weight: 500;
        color: rgba(0, 4, 0, 1);
        line-height: 0.36rem;
      }
    }
  }
  .time {
    text-align: center;
    margin-top: 0.3rem;
    p {
      font-size: 0.22rem;
      font-family: PingFang SC;
      font-weight: 600;
      color: rgba(0, 4, 0, 1);
      line-height: 0.36rem;
    }
  }
  .miniprogram-code {
    text-align: center;
    .img-box {
      width: 1.66rem;
      height: 1.66rem;
      margin: 0 auto;
      margin-top: 0.9rem;
      img {
        width: 100%;
      }
    }
    p {
      font-size: 0.22rem;
      font-family: PingFang SC;
      font-weight: 400;
      color: rgba(0, 4, 0, 1);
      line-height: 0.36rem;
      margin-top: 0.21rem;
    }
  }
  .my-btn {
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    padding: 0.27rem 0.36rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .mybtn {
      flex: 0.48;
    }
  }
}
</style>
